import { defineStore } from 'pinia'

export const useUploadStore = defineStore('upload', {
  state: () => ({
    formData: new FormData(),
  }),
  actions: {
    // 存入 FormData 对象
    setFormData(data: FormData) {
      this.formData = data
    },
    // 获取存储的 FormData 对象
    getFormData(): FormData | null {
      return this.formData
    }
  }
})
